from django.urls import path
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'', views.BlogViewSet)

urlpatterns = [
    path(r'list/', views.BlogListView.as_view()),
    path(r'dates/', views.BlogDateView.as_view()),
    path(r'categories/', views.BlogCategoryView.as_view()),
    # 每日访问量查询
    path(r'daily-pv/', views.DailyPVView.as_view()),
    path(r'daily-pv/past-seven-days/', views.get_past_seven_days_pv),
    path(r'daily-pv/today/', views.get_today_pv),

    # 某博客访问量查询
    path(r'blog-pv/', views.BlogPVView.as_view()),
]
urlpatterns += router.urls
